import configparser
import os

# 读入配置文件
def get_config():
    config = configparser.ConfigParser()
    config.read('../iselenium.ini', encoding="utf-8")
    print(os.environ)
    # print(os.path.join(os.environ['HOMEPATH']))
    return config

if __name__ == '__main__':
    print(get_config().items('driver'))
    print(get_config().get('driver', 'chrome_driver'))